import { PrismaService } from 'src/database/prisma.service';
import { ElementHandle } from 'puppeteer';
export { PrismaService };

export interface IScraperProp {
  url: string;
  keyword: string;
  cookie?: string;
  taskId?: number;
  dbService?: PrismaService;
  selector?: string;
}
export interface IShop {
  shopname: string;
  link: string;
}
export interface IPrice {
  shop_price: number;
  platform_price: number;
}
export interface IGoods {
  taskId: number;
  skuName: string;
  skuId: string;
  shopName: string;
  shopPrice: number;
  platformPrice: number;
  source: string;
  detail: string;
  updateTime: Date;
}
export const EmptyGoods = {
  taskId: 0,
  skuName: '',
  skuId: '',
  shopName: '',
  shopPrice: 0,
  platformPrice: 0,
  source: '',
  detail: '',
  updateTime: new Date(),
};

// 类型定义
export type StringElementHandleTuple = [string, ElementHandle];

export interface MonitorOptions {
  // cookieFilePath?: string; 
  referer?: string;
}